home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / polylistP.h < prev    next >
C/C++ Source or Header  |  1992-07-09  |  2KB  |  63 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10. /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */
  11.  
  12. #ifndef    POLYLISTPDEFS
  13. #define    POLYLISTPDEFS
  14. /*
  15.  * Private definitions for PolyList's
  16.  */
  17.  
  18. #include "bboxP.h"
  19. #include "polylist.h"
  20.  
  21. #define PLMAGIC GeomMagic ('p', 1)
  22.  
  23. typedef struct Vertex
  24. {
  25.     HPoint3    pt;
  26.     ColorA    vcol;
  27.     Point3    vn;
  28. }  Vertex;
  29.  
  30. typedef struct Poly
  31. {
  32.     int    n_vertices;
  33.     Vertex    **v;
  34.     ColorA  pcol;
  35.     Point3    pn;
  36. }  Poly;
  37.  
  38. struct PolyList
  39. {
  40.     GEOMFIELDS
  41.     int    n_polys;
  42.     int    n_verts;
  43.     Poly    *p;
  44.     Vertex    *vl;
  45.     int    flags;
  46.     int    seq;        /* for 4D->3D tforms */
  47. #  define      PL_HASVN    0x1    /* Per-vertex normals (vn) valid */
  48. #  define      PL_HASPN    0x2    /* Per-polygon normals (pn) valid */
  49. #  define      PL_HASVCOL    0x4    /* Per-vertex colors (vcol) valid */
  50. #  define      PL_HASPCOL    0x8    /* Per-polygon colors (pcol) valid */
  51. #  define      PL_EVNORM    0x10    /* Normals are everted */
  52. #  define      PL_4D        0x20    /* true 4D points */
  53.  
  54. };
  55.  
  56.  
  57. extern PolyList *PolyListCreate(PolyList *exist, GeomClass *Class, va_list a_list);
  58. extern PolyList *PolyListCopy( PolyList *poly );
  59. extern PolyList *PolyListDelete( PolyList *poly );
  60. extern PolyList *PolyListPick( PolyList *, Pick *, Appearance *, Transform );
  61.  
  62. #endif/*POLYLISTPDEFS*/
  63.